ARM: vGIC: add LPI VCPU ID to struct pending_irq
authorAndre Przywara <andre.przywara@arm.com>
Fri, 7 Apr 2017 10:23:53 +0000 (11:23 +0100)
committerStefano Stabellini <sstabellini@kernel.org>
Wed, 14 Jun 2017 18:38:37 +0000 (11:38 -0700)
commit33c68607f2fee360a0f48a3f717967f2f2004ea2
treed42235cb8d6917e1523ee0081bd47ec90ff57873
parent9c34e21429ca31477fe234ee63e1cfde1de778d3
ARM: vGIC: add LPI VCPU ID to struct pending_irq

The target CPU for an LPI is encoded in the interrupt translation table
entry, so can't be easily derived from just an LPI number (short of
walking *all* tables and find the matching LPI).
To avoid this in case we need to know the VCPU (for the INVALL command,
for instance), put the VCPU ID in the struct pending_irq, so that it is
easily accessible.
We use the remaining 8 bits of padding space for that to avoid enlarging
the size of struct pending_irq. The number of VCPUs is limited to 127
at the moment anyway, which we also confirm with a BUILD_BUG_ON.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Julien Grall <julien.grall@arm.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/vgic.c
xen/include/asm-arm/vgic.h